package com.xiaozhen.common.core.domain.system;

import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableLogic;
import com.baomidou.mybatisplus.annotation.TableName;
import com.xiaozhen.common.core.domain.BaseEntity;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;

import java.util.Date;
import java.util.List;
import java.util.Set;

/**
 * @author zysoft
 */
@Data
@TableName("sys_user")
@ApiModel(description = "系统用户表")
public class SysUser extends BaseEntity {

    @TableId
    @ApiModelProperty(value = "用户ID")
    private Long userId;

    @ApiModelProperty(value = "部门ID")
    private Long deptId;

    @ApiModelProperty(value = "用户名")
    private String userName;

    @ApiModelProperty(value = "用户昵称")
    private String nickName;

    @ApiModelProperty(value = "角色类别")
    private String userType;

    @ApiModelProperty(value = "邮箱地址")
    private String email;

    @ApiModelProperty(value = "手机号")
    private String phonenumber;

    @ApiModelProperty(value = "用户性别 0=男,1=女,2=未知")
    private String sex;

    @ApiModelProperty(value = "盐")
    private String avatar;

    @ApiModelProperty(value = "密码")
    private String password;

    @ApiModelProperty(value = "用户状态")
    private String status;

    @TableLogic
    @ApiModelProperty(value = "删除标识（0-正常,1-删除）")
    private Integer delFlag;

    @ApiModelProperty(value = "登录IP")
    private String loginIp;

    @ApiModelProperty(value = "登录时间")
    private Date loginDate;

    @ApiModelProperty(value = "备注")
    private String remark;

    @TableField(exist = false)
    @ApiModelProperty(value = "权限列表")
    private List<String> permissions;

    @TableField(exist = false)
    @ApiModelProperty(value = "岗位ID组")
    private Long[] postIds;

    @TableField(exist = false)
    @ApiModelProperty(value = "角色ID组")
    private Long[] roleIds;
}
